package com.luoqiz.designPatterns.factory.simpleFactory;

public class OperationFaction {

	public static Operation createOperation(String operation) {
		Operation op = null;
		switch (operation) {
		case "+":
			op = new AddOperation();
			break;
		case "-":
			op = new SubOperation();
			break;
		case "*":
			op = new MulOperation();
			break;
		default:
			op = new MulOperation();
			break;
		}
		return op;
	}
}
